package day01_iterator;

/**
 * @author Koizumi Sinya
 * @date 2018/11/06. 21:42
 * @edithor
 * @date
 */
public class Main {
    public static void main(String[] args) {

        Book book = new Book("Java");
        Book book2 = new Book("Android");
        Book book3 = new Book("PHP");
        Book book4 = new Book("JavaScript");
        Book book5 = new Book("HTML");

        BookStore bookStore = new BookStore(5);
        bookStore.appendBook(book);
        bookStore.appendBook(book2);
        bookStore.appendBook(book3);
        bookStore.appendBook(book4);
        bookStore.appendBook(book5);

        Iterator iterator = bookStore.iterator();
        while (iterator.hasNext()) {
            Book temp = (Book) iterator.next();
            System.out.println(temp.toString());
        }
    }
}
